﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSemIII.MasterPage
{
    public partial class Administrator : System.Web.UI.MasterPage
    {
        private string pageName;
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["Name"] = "Minh Mít";
            pageName = Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath);
            pageTitle.InnerText = pageName;
            linkSecondMenu.Text = pageName;
            if (pageName.Contains("Account"))
            {
                linkMainMenu.Text = "Account";
                linkMainMenu.NavigateUrl = "/Administrator/Account/PendingAccount.aspx";
            }
            else if (pageName.Contains("Survey"))
            {
                linkMainMenu.Text = "Survey";
                linkMainMenu.NavigateUrl = "/Administrator/Survey/SurveyCatalog.aspx";
            }
            else if (pageName.Contains("Support") || pageName.Contains("FAQ"))
            {
                linkMainMenu.Text = "Support & FAQ";
                linkMainMenu.NavigateUrl = "/Administrator/Support/Support.aspx";
            }
        }
    }
}